﻿//======================================================================
//
//        Copyright (C) 2008 HOHO``
//        All rights reserved
//
//        filename :$safeitemrootname$
//        description :责任部门选择用户控件。
//
//        created by 裘中杰 at  $time$
//======================================================================


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Hisun.UserControl.CostCenter
{
    public partial class DutyDeptSelect : System.Web.UI.UserControl
    {
        private bool isShowDisabled = false;

        public bool IsShowDisabled
        {
            get { return isShowDisabled; }
            set { isShowDisabled = value; }
        }

        private string controlName;

        public string ControlName
        {
            get { return controlName; }
            private set { controlName = value; }
        }
        private string controlValue;

        public string ControlValue
        {
            get { return controlValue; }
            private set { controlValue = value; }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            controlName = txtDutyDeptName.ClientID;
            controlValue = txtDutyDeptID.ClientID;
            //txtDutyDeptName.Attributes.Add("onfocus", string.Format("OpenSelectWindow('{0}','{1}');", controlName, controlValue));
            txtDutyDeptName.Attributes.Add("onclick", string.Format(@"OpenSelectWindow('{0}','{1}','{2}');", controlName, controlValue, isShowDisabled));
            txtDutyDeptName.Attributes.Add("readonly", "readonly");
            txtDutyDeptID.Style.Add("display", "none");
        }
    }
}